*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
************************ DRÄGER AND NGHIEM (2025) ***********************
*INFLATION LITERACY, INFLAION EXPECTATIONS, AND TRUST IN THE CENTRAL BANK: 
*                           A SURVEY EXPERIMENT 
****************** THE REVIEW OF ECONOMICS AND STATISTICS ***************
*********************** (REPLICATION FILES) *****************************
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*

***********************   JANUARY 2025  *******************************

***** Note: Read "README.txt for details about the code and data ********

*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*** Set STATA
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*

*** Clear all ***
clear all
version 18

******************

*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*** Generate tables and figures in the Online Appendix

*A.6 Additional Results
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*

	use "Inflation_literacy_Jan2025_final.dta" , clear
	
*A.6 Additional Results

*Table A38: Effect of Treatments on the Likelihood of Providing Probabilistic Forecasts: Extensive Margin

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp1y inf_exp3y"
	
	foreach y of local target {
	
	qui: probit `y'_prob_ans  i.further_treatment  `controls' if wave== 1 & basic_treatment == 0 
	qui: estpost margins, dydx(further_treatment)
	eststo
	
	qui: probit `y'_prob_ans  i.further_treatment  `controls' if wave== 1 & basic_treatment == 1
	qui: estpost margins, dydx(further_treatment)
	eststo
	}
	
	esttab using "TableA38.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	 star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	 title(Effect of Treatments on Likelihood of Providing Probabilistic Forecast) ///
	stats(r2_p N, labels("\text{Pseudo R$^2$}" "\text{N observations}") fmt(3 0 0))
	
	
*Table A39: Interaction Effects of the Literacy Treatment and Quantitative Information Treatments: Likelihood of Choosing Only One Bin in the Probabilistic Inflation Forecast Question
	
	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp1y inf_exp3y"
	
	foreach y of local target {
	gen inf_prior = `y'_point
	qui: probit `y'_nbins_d inf_prior i.further_treatment##i.basic_treatment  `controls' if wave == 1 & sample_robust_w1_298 == 1
	*estpost margins , dydx(*)
	eststo
	drop inf_prior 
	}
		
	esttab using "TableA39.tex", replace style(tex)    b(a1)  numbers nodepvars ///
	 star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	 title(Likelihood of Choosing Only One Bin in the Probabilistic Inflation Forecast Question) ///
	stats(r2_p N, labels("\text{Pseudo R$^2$}" "\text{N observations}") fmt(3 0 0))	
	
*Table A40: Interaction Effects of Literacy and Quantitative Treatments on Uncertainty across Forecast Accuracy Groups

*Before running Table A40, ensure that Table 4 in the 'Main_Tables.do' file is executed first. This step generates the Huber weights required for columns 1 and 2.

*Forecast accuracy

	gen inf_exp1y_error = abs(inf_exp1y_prob -7.4)

	xtile inf_exp1y_error_group = inf_exp1y_error if wave == 1 & sample_robust_w1_298 == 1, n(4)
	
*Estimation:
	
	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp1y"

	foreach y of local target {
	gen inf_prior = `y'_point
	
	qui: reg `y'_var inf_prior i.further_treatment##i.basic_treatment  `controls' [aweight= hw_var_`y'] if inf_exp1y_error_group== 1 & wave== 1 & sample_robust_w1_298 == 1
	qui: estpost  
	eststo
	
	qui: reg `y'_var inf_prior i.further_treatment##i.basic_treatment  `controls' [aweight= hw_var_`y'] if inf_exp1y_error_group== 4 & wave== 1 & sample_robust_w1_298 == 1
	qui: estpost  
	eststo
	
	drop inf_prior
	}
	
	esttab using "TableA40.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	 star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	 title(Interaction Effects of Literacy and Quantitative Treatments on Uncertainty across Forecast Accuracy Groups) ///
	stats(r2 N, labels("\text{R$^2$}" "\text{N observations}") fmt(3 0 0))

********************************************************************************
********************************************************************************